***Friends in the Profession ISQ Replication Code***
***Reyko Huang, Daniel Silverman, Benjamin Acosta***
***Updated 7-24-21***

***Main Text***

*Figure 1/Bar Graph*
graph bar studyab workab milab exile, showyvars yvaroptions(relabel(1 "Study Abroad" 2 "Work Abroad" 3 "Military Abroad" 4 "Exile")) bargap(50) percentages ylabel(0 "0%" 10 "10%" 20 "20%" 30 "30%" 40 "40%", angle(0)) ytitle("Percent of Rebel Leaders") legend(off) scheme(s1mono) bar(1, fcolor(navy) lcolor(navy)) bar(2, fcolor(navy) lcolor(navy)) bar(3, fcolor(navy) lcolor(navy)) bar(4, fcolor(navy) lcolor(navy))

*Table 1/Base Models*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad, robust
outreg2 using "ROLE_Sponsors_Base.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads, robust
outreg2 using "ROLE_Sponsors_Base.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Base.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Base.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Figure 2/Beta Coefficients*
foreach v of varlist nags_numsupporters dynamicage education military combat expabroad rebweak rebstrong centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity {
    gen `v'2 = `v'
	center `v'2, inplace standardize
} 
reg nags_numsupporters2 dynamicage2 education2 military2 combat2 expabroad2 rebweaker2 rebstronger2 centcontrol2 govsupport2 transconstsupp2 terrcont2 multdyads2 rivalry2 rgdppc2 xpolity2 stdcinc, robust
coefplot, drop(_cons) xline(0) nolabels ///
headings(dynamicage2 = "{bf:Leader Level}" rebweaker2 = "{bf:Organization Level}" rivalry2 = "{bf:Country Level}", labcolor(blue)) graphregion(color(white)) graphregion(lcolor(black)) plotregion(lcolor(black))

*Figure 3/Host Countries*
eststo clear
quietly logit countrymatch dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
estimates store Match
quietly logit nocountrymatch dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
estimates store NonMatch
coefplot (Match, label(Host Country)) ///
(NonMatch, label(Non-Host Country)) ///
, drop(_cons dynamicage education military combat rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc) eform xline(0) nolabels ytitle("Effect of Study Abroad on Odds of Support") scheme(s1mono) ylabel(none) yscale(titlegap(2))

*Table 2/Experience Types*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat studyab rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Types.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat workab rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Types.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat milab rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Types.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat exile rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Types.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat studyab workab milab exile rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Types.doc", append alpha(0.001, 0.01, 0.05) dec(2)

***Appendix***

*Table A1/Individual Sponsors*
eststo clear
eststo: quietly logit usback dynamicage education military combat usstudy rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Individual.doc", replace alpha (0.001, 0.01, 0.05) dec(2)
eststo: quietly logit franceback dynamicage education military combat francestudy rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Individual.doc", append alpha (0.001, 0.01, 0.05) dec(2)
eststo: quietly logit egyptback dynamicage education military combat egyptstudy rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Individual.doc", append alpha (0.001, 0.01, 0.05) dec(2)

*Table A2/Other Advantages*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Advantages.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc family, robust
outreg2 using "ROLE_Sponsors_Advantages.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc family polyglot, robust
outreg2 using "ROLE_Sponsors_Advantages.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc family polyglot rebpolwing, robust
outreg2 using "ROLE_Sponsors_Advantages.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc family polyglot rebpolwing finance, robust
outreg2 using "ROLE_Sponsors_Advantages.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Table A3/Entry Methods*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Entry.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc elected, robust
outreg2 using "ROLE_Sponsors_Entry.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc elected appointed, robust
outreg2 using "ROLE_Sponsors_Entry.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Table A4/Gscholar Measure*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_GScholar.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc gscholar, robust
outreg2 using "ROLE_Sponsors_GScholar.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Table A5/Cold War*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_ColdWar.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc coldwar, robust
outreg2 using "ROLE_Sponsors_ColdWar.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc if coldwar == 1, robust
outreg2 using "ROLE_Sponsors_ColdWar.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc if coldwar == 0, robust
outreg2 using "ROLE_Sponsors_ColdWar.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Table A6/Rebel Ideology*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Ideology.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc nagleft nagright nagtheo, robust
outreg2 using "ROLE_Sponsors_Ideology.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly logit usback dynamicage education military combat usstudy rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc nagleft nagright nagtheo, robust
outreg2 using "ROLE_Sponsors_Ideology.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly logit franceback dynamicage education military combat francestudy rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc nagleft nagright nagtheo, robust
outreg2 using "ROLE_Sponsors_Ideology.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Table A7/State Disruption*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Assassin.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc assassin, robust
outreg2 using "ROLE_Sponsors_Assassin.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Table A8/Clustered Errors*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Clustering.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, cluster(actorid)
outreg2 using "ROLE_Sponsors_Clustering.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, cluster(ccode)
outreg2 using "ROLE_Sponsors_Clustering.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Table A9/Model Selection*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Selection.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly nbreg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Selection.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly poisson nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Selection.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Table A10/DV Operationalization*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Outcome.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly logit nags_binary dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Outcome.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly ologit nags_ordinal dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Outcome.doc", append alpha(0.001, 0.01, 0.05) dec(2)

*Table A11/UCDP External Support*
eststo clear
eststo: quietly reg nags_numsupporters dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Outcome2.doc", replace alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly logit ucdp_binary dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Outcome2.doc", append alpha(0.001, 0.01, 0.05) dec(2)
eststo: quietly ologit ucdp_ordinal dynamicage education military combat expabroad rebweaker rebstronger centcontrol govsupport transconstsupp terrcont multdyads rivalry rgdppc xpolity stdcinc, robust
outreg2 using "ROLE_Sponsors_Outcome2.doc", append alpha(0.001, 0.01, 0.05) dec(2)


